﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace DirectorRoomHelper
{
    /// <summary>
    /// Interaction logic for AddFolderWindow.xaml
    /// </summary>
    public partial class AddFolderWindow : Window
    {
        public AddFolderWindow()
        {
            InitializeComponent();
            NewFolder = string.Empty;
        }

        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            string text = tbxNewFolder.Text.Trim().Replace("'", "");
            if (string.IsNullOrEmpty(text))
            {
                tbxNewFolder.BorderBrush = FindResource("ErrorTextBoxBrush") as Brush;
                return;
            }

            NewFolder = tbxNewFolder.Text.Trim().Replace("'", "");
            this.Close();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        public string NewFolder { get; set; }
        public string CurrFolder 
        {
            get { return txtCurrFolder.Text; }
            set { txtCurrFolder.Text = value; }
        }
    }
}
